package vip.zhenzicheng.design_patterns.builder.demo1;

/**
 * @author zhenzicheng
 * @date 2022-05-25 17:46
 */
public class Director {

  //声明builder类型的变量
  private final Builder builder;

  public Director(Builder builder) {
    this.builder = builder;
  }

  //组装自行车的功能
  public Bike construct() {
    builder.buildFrame();
    builder.buildSeat();
    return builder.createBike();
  }
}
